﻿using System;
using System.ComponentModel;

namespace SxPackages.STC32G.DesignEditor
{
	/// <summary>
	/// 引脚集合下拉列表框
	/// </summary>
	class PinsConvertor : StringConverter
	{
		public override Boolean GetStandardValuesSupported(ITypeDescriptorContext context)
		{
			return true;
		}

		public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
		{
			return new StandardValuesCollection(DataSource.Options.PinNames);
		}

		public override Boolean GetStandardValuesExclusive(ITypeDescriptorContext context)
		{
			return true;
		}

		/// <summary>
		/// 该属性不支持折叠
		/// </summary>
		/// <param name="context"></param>
		/// <returns></returns>
		public override bool GetPropertiesSupported(ITypeDescriptorContext context)
		{
			return false;
		}
	}
}
